package com.yxch.admin.controller.home;

import com.yxch.admin.model.commen.QsPoint;
import com.yxch.admin.service.home.HomeService;
import com.yxch.admin.utils.ResultAPI;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Slf4j
@RequestMapping("/yxch/admin/home")
public class DirectionController {
    @Autowired
    HomeService homeService;

    /**
     * 获得试卷方向
     *
     * @return
     */
    @GetMapping("/direction")
    public ResultAPI getDirectionLsit(@RequestParam Integer direction_id) {
        return homeService.getDirectionLsit(direction_id);
    }

    @PostMapping("point")
    public ResultAPI addPoint(@RequestBody QsPoint qsPoint) {
        return homeService.addPoint(qsPoint);
    }
}
